package com.boot.project.core.enums.code.impl.systemCode;

import com.boot.project.core.enums.code.BaseCode;
import lombok.AllArgsConstructor;

/**
 * @description:
 * @author: tsing
 * @create: 2021-01-24 15:37
 */
@AllArgsConstructor
public enum  RoleCode implements BaseCode {

    EXISTS_ROLE_NAME(false, 4108, "角色名称已存在"),
    ASSIGN_RESOURCE_FAILURE(false, 4109, "分配资源失败"),
    EXISTS_USERS_BELONG_THIS_ROLE(false, 4110, "该角色下仍有用户存在"),
    ;

    private Boolean success; // 是否成功
    private int code; // 状态码
    private String message; // 操作信息

    @Override
    public boolean success() {
        return this.success;
    }

    @Override
    public int code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }
}
